<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		     <script src="../../js/vue.min.js"></script>
	</head>
	<body>
		
		
		<div id="app">
		        <h1>姓名：<label v-text="Name"></label></h1>
		        <h1>年龄：{{ Age }}</h1>
		
		        <button  v-on:click="Hello">Hello</button>
		    </div>

		    <script type="text/javascript">
		    //Model
		    var data = {
		        Name: '小明',
		        Age: 18,
		    }
		
		    //ViewModel
		    var vue = new Vue({
		        el: '#app',
		        data: data,
		        methods: {
		            Hello: function (event) {
		                // `this` 在方法里指当前 Vue 实例
		                alert('Hello ' + this.Name + '!');
		                this.Age++;
		            }
		        }
		    });
		    </script>